import {TreeViewElement} from "./TreeViewElement";

export class TreeGridElement extends TreeViewElement{
  elementRender=(space,ico)=>{
      return <React.Fragment>
             {
               this.props.cloumn.map((f)=>{
                   let ds=this.props.dataSource;
                   let dis=ds[f.name];
                   //console.log(this.props.treeCol);
                   if(this.props.treeCol===f.name){
                     dis=this.element(space,ico);
                   }
                   return <span className="col"  style={{display:"inline-block",minWidth:f.width}}>&nbsp;{dis}</span>;
               })

             }
           </React.Fragment>
  }
}
